package com.queen.restaurant.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.queen.restaurant.dao.CourseDao;
import com.queen.restaurant.domain.Course;

@Service
public class CourseService {
	
	@Autowired
	private CourseDao courseDao;
	
	public List<Course> getCourseByCourseTypeId(int id){
		return courseDao.getCourseByCourseTypeId(id);
	}
	
	public void createCourse(Course course){
		courseDao.save(course);
	}
	
	public void deleteCourseById(int id){
		courseDao.deleteCourseById(id);
	}
	
	public void updateCourse(Course course){
		courseDao.update(course);
	}
}
